/**
*  \file switch.h
*
*  \brief
*
*  \author Dajin Li
*
*
*/
/*===============================================[ private includes  ]================================================*/


#ifndef __SWITCH_H_
#define __SWITCH_H_

#include "../pal/pal_types.h"


/*================================================[ public includes  ]================================================*/


/*================================================[ public datatypes ]================================================*/


/*================================================[ public defines   ]================================================*/
#define Park_Brake_In_Switch                    ((Switches_Current & BIT0)  != 0)   /*PARK_BRAKE_IN_D_CPU_V*/
#define Reserve1_In_Switch                      ((Switches_Current & BIT1)  != 0)   /*RESERVE_1_IN_D_CPU_V*/
#define Main_Cont_Error_In_Switch               ((Switches_Current & BIT2)  != 0)   /*MAIN_CONTACTOR_ERROR*/ 
#define Cutoff_ISO_Valve_Error_In_Switch        ((Switches_Current & BIT3)  != 0)   /*CUT-OFF_ISO_VALVE_ERROR*/
#define Buzzer_Error_In_Switch                  ((Switches_Current & BIT4)  != 0)   /*BUZZER_ERROR*/ 
#define Fan_Error_In_Switch                     ((Switches_Current & BIT5)  != 0)   /*FAN_ERROR*/
#define Forward_In_Switch                       ((Switches_Current & BIT6)  != 0)   /*FORWARD_IN_D_CPU_V*/ 
#define Boot_Anchor_In_Switch                   ((Switches_Current & BIT7)  != 0)   /*/BOOT_ANCHOR_CPU_M*/ 
#define Seat_Nc_In_Switch                       ((Switches_Current & BIT8)  != 0)   /*SEAT_SWITCH_NC_IN_D_CPU_V*/
#define Neutral_Position_In_Switch              ((Switches_Current & BIT9)  != 0)   /*NEUTRAL_POSITION_IN_D_CPU_V*/
#define Reverse_In_Switch                       ((Switches_Current & BIT10) != 0)   /*REVERSE_IN_D_CPU_V*/ 
#define Lift_In_Switch                          ((Switches_Current & BIT11) != 0)   /*LIFT_IN_D_CPU_V*/
#define Tilt_In_Switch                          ((Switches_Current & BIT12) != 0)   /*TILT_IN_D_CPU_V*/ 
#define Mast_Aux1_In_Switch                     ((Switches_Current & BIT13) != 0)   /*MAST_AUX_1_IN_D_CPU_V*/
#define Mast_Aux2_In_Switch                     ((Switches_Current & BIT14) != 0)   /*MAST_AUX_2_IN_D_CPU_V*/ 
#define Seat_In_Switch                          ((Switches_Current & BIT15) != 0)   /*SEAT_SWITCH_IN_D_CPU_V*/ 
#define CPU_Sync_Switch                         ((Switches_Current & BIT16) != 0)   /*CPU_SYNC*/ 
#define Tlf_int_Switch                          ((Switches_Current & BIT17) != 0)   /*TLF_INT*/ 
#define Tlf_safeState1_Switch                   ((Switches_Current & BIT18) != 0)   /*TLF_SATESTATE1*/ 
#define Tlf_error_switch                        ((Switches_Current & BIT19) != 0)   /*TLF_ERROR*/ 



/*================================================[ public variables ]================================================*/


extern U32 Switches_Ready;

extern U32 Switches_Current;

/*================================================[ inline functions ]================================================*/

/*================================================[ public functions ]================================================*/
void switch_inputs_sample(void);



#endif
/***********************************************************************************************************************
*                             Copyright 2016 Linde Material Handling. All rights reserved.                             *
***********************************************************************************************************************/

